package com.learn.designPatterns.behavioral.strategy;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-25 15:50
 */
public class Duck {

    private QuackBehavior quackBehavior;

    public void performQuack() {
        if (quackBehavior != null)
            quackBehavior.quack();
    }

    public void setQuackBehavior(QuackBehavior quackBehavior) {
        this.quackBehavior = quackBehavior;
    }
}
